﻿// *----------------------------------------------------------------
// Copyright (C) 2017 通通优品
// 版权所有。
// 
// 类名：Images.cs
// 功能描述：TongTongMall.MallWeb.Core
// 
// Create User：jym 2017/02/09
// 
// Edit User：UserName,EditTime
// Describe：Describe
// ----------------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TongTongMall.Domain.Entities;
using TongTongMall.Domain.Repositories.Attributes;
using TongTongMall.Domain.Repositories.Entities;

namespace TongTongMall.MallWeb.Core.Components
{
    [System.ComponentModel.DataAnnotations.Schema.Table("ImageInfo")]
    public class Images : AggregateRoot<Guid>,IMustHaveTenant
    {
        #region 构造函数
        public Images() { }

       
        public Images(Guid imageId,string ext, byte? delStatus, string phypath, string useType, long? userId, int? managerId, string uri, long tenantId)
        {
            ImageID = imageId;
            Ext = ext;
            DelStatus = delStatus;
            Phypath = phypath;
            Usetype = useType;
            UserID = userId;
            ManagerID = managerId;
            URI = uri;
            TenantID = tenantId;
        }
        #endregion

        #region 字段
        private Guid _imageID;
        private DateTime _addDate = DateTime.Now;
        private string _ext;
        private byte? _delStatus;
        private string _phypath;
        private string _usetype;
        private long? _userID;
        private int? _managerID;
        private string _uRI;
        #endregion

        #region 属性
        /// <summary>
        /// 标识
        /// </summary>
        [Identify]
        public Guid ImageID
        {
            get { return _imageID; }
            set { _imageID = value; }
        }
        /// <summary>
        /// 添加时间
        /// </summary>
        public DateTime AddDate
        {
            get { return _addDate; }
            set { _addDate = value; }
        }
        /// <summary>
        /// 扩展名.如：.jpg
        /// </summary>
        public string Ext
        {
            get { return _ext; }
            set { _ext = value; }
        }
        /// <summary>
        /// 删除状态.Null：使用中；1:已删除；2：回收站；3：待销毁
        /// </summary>
        public byte? DelStatus
        {
            get { return _delStatus; }
            set { _delStatus = value; }
        }
        /// <summary>
        /// 存储路径.物理路径
        /// </summary>
        public string Phypath
        {
            get { return _phypath; }
            set { _phypath = value; }
        }
        /// <summary>
        /// 用途类型.如：用于权限判断、固定类型分类
        /// </summary>
        public string Usetype
        {
            get { return _usetype; }
            set { _usetype = value; }
        }
        /// <summary>
        /// 用户标识.前台会员。 UserBaseinfo表
        /// </summary>
        public long? UserID
        {
            get { return _userID; }
            set { _userID = value; }
        }
        /// <summary>
        /// 管理员标识.后台管理员。 NetManagerInfo表
        /// </summary>
        public int? ManagerID
        {
            get { return _managerID; }
            set { _managerID = value; }
        }
        /// <summary>
        /// 链接
        /// </summary>
        public string URI
        {
            get { return _uRI; }
            set { _uRI = value; }
        }

        /// <summary>
        /// 租户Id
        /// </summary>
        public long TenantID { get; set; }
        #endregion
    }
}
